@extends('default.template')

@section('title',$result['title'])
<style>
    .btn-outline-secondary {
        color: #a17656 !important;
        background-color: transparent;
        background-image: none;
        border-color: #a17656 !important;
    }
    .btn-outline-secondary:hover {
        color: #fff !important;
        background-color: #a17656 !important;
    }
    .about_us {
        width: 90%;
        margin: 0 auto;
    }

    .about_us .icon, .show_news .icon, .show_development .icon,.show_product .icon{
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .about_us .figure-caption {
        line-height: 28px;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .about_us .figure {
        margin-bottom: 20px;
    }

    .show_news, .show_product {
        background: #ede0c4;
    }

    .show_news #myTab {
        max-width: 360px;
        margin: 0 auto;
        margin-bottom: 40px;
    }

    .nav-tabs {
        border-bottom: none !important;
    }

    .show_news #myTab li {
        width: 140px;
    }

    .show_news #myTab li a {
        width: 140px;
        height: 30px;
        line-height: 10px;
    }

    .show_news #myTab li:first-child {
        margin-right: 80px;
    }

    .show_news .nav-tabs .nav-link {
        border: 2px solid #a17656 !important;
    }

    .show_news .media {
        max-height: 136px;
        overflow: hidden;
    }

    .show_news .media-body {
        color: #a17656;
    }

    .show_news .media-body p {
        font-size: 12px;
        color: #a17656;
        line-height: 24px;
        height: 72px;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        margin-bottom: 0;
    }

    .show_news .media-body .news_time {
        color: #bd9f7f;
        margin-bottom: 10px;
    }



    .show_news .btn {
        margin: 10px auto;
        display: block;
    }
    .show_product img{
        max-width:340px;
        width: 100%;
    }
    .show_product .media{
        width: 80%;
        margin: 0 auto;
    }
    .show_product .media-body{
        height: 340px;
        overflow: hidden;
    }
    @media (max-width: 576px) {
        .about_us .icon, .show_news .icon,.show_development .icon,.show_product .icon {
            padding-top: 20px;
            padding-bottom: 20px;
        }
        .about_us .figure {
            margin-bottom: 20px;
        }

        .about_us .figure-caption {
            max-height: 140px;
        }

        .about_us .btn {
            position: unset;
            margin-top: 20px;
        }
        .show_news #myTab li:first-child {
            margin-right: 0px;
        }
        .show_news .nav-link{
            padding-left: 0;
            padding-right: 0;
            margin-right: 0 !important;
        }
        .show_news .row .col-md {
            border-bottom: 2px solid #a17656;
            margin-right: 0px;
            margin-top: 10px;
            margin-left: 0px;

        }
        .show_news .media {
            max-height: 90px;
            overflow: hidden;
        }
        .show_news .media .align-self-center{
            height: 90px;
            padding-bottom: 3px;
        }
        .show_development .development_pic{
            width: 50%;
            padding: 0;
        }
        .Mask{
            text-align: center;
        }
        .show_product .media img{
            margin: 0 auto;
        }
        .show_product #carouselExampleControls{
            padding-bottom: 20px;
        }
    }

    @media (min-width: 576px) {
        .about_us .figure-caption {
            max-height: 140px;
        }

        .about_us .btn {
            position: unset;
            margin-top: 20px;
        }
        .show_news .row .col-md {
            border-bottom: 2px solid #a17656;
            margin-right: 0px;
            margin-top: 10px;
            margin-left: 0px;
        }
        .show_news .media {
            max-height: 90px;
            overflow: hidden;
        }
        .show_news .media .align-self-center{
            height: 90px;
            padding-bottom: 3px;
        }
        .show_development .development_pic{
            width: 50%;
            padding: 0;
        }
        .Mask{
            text-align: center;
        }

        .show_product .media img{
            margin: 0 auto;
        }
    }

    @media (min-width: 768px) {
        .about_us .figure-caption {
            max-height: 112px;
        }

        .about_us .btn {
            position: absolute;
            bottom: 0;
            left: 15px;
        }
        .show_news .row .col-md {
            border-bottom: 2px solid #a17656;
            margin-right: 25px;
            margin-top: 10px;
            margin-left: 25px;
        }
        .show_news .media {
            max-height: 100px;
            overflow: hidden;
        }
        .show_news .media .align-self-center{
            height: 100px;
            padding-bottom: 3px;
        }
        .show_news .btn {
            margin: 30px auto;
            display: block;
        }

    }

    @media (min-width: 992px) {
        .about_us .figure-caption {
            max-height: 140px;
        }

        .about_us .btn {
            position: absolute;
            bottom: 0;
            left: 15px;
        }
        .show_product .media img{
            margin: unset;
        }
    }

    @media (min-width: 1200px) {
        .about_us .figure-caption {
            max-height: 196px;
        }

        .about_us .btn {
            position: absolute;
            bottom: 0;
            left: 15px;
        }

        /*遮罩*/
        .show_development{
            width: 100%;
            height: 770px;
            overflow-x: hidden;
            overflow-y:hidden;
        }
        .show_development .development_pic{
            position: absolute;
            clip:rect(0px,228px,571px,0px);
            padding: 0;
            width: unset;
        }
        .show_development .Mask{
            width: 228px;
            height: 571px;
            position: absolute;
        }
        .show_development .Mask div:first-child{
            width: 100%;
            height: 50%;
            background: rgba(255,255,255,0.6);
            /*transition: all .5s;*/
            /*-moz-transition: all .5s;	!* Firefox 4 *!*/
            /*-webkit-transition: all .5s;	!* Safari 和 Chrome *!*/
            /*-o-transition: all .5s;	!* Opera *!*/
        }
        .show_development .Mask:hover div:first-child{
            height: 0;
        }


        .show_development .Mask div:nth-child(2){
            position: absolute;
            bottom: 0;
            transform: rotate(180deg);
            -ms-transform: rotate(180deg);		/* IE 9 */
            -webkit-transform: rotate(180deg);	/* Safari and Chrome */
            -o-transform: rotate(180deg);		/* Opera */
            -moz-transform: rotate(180deg);
            width: 100%;
            height: 50%;
            background: rgba(255,255,255,0.6);
            /*transition: all .5s;*/
            /*-moz-transition: all .5s;	!* Firefox 4 *!*/
            /*-webkit-transition: all .5s;	!* Safari 和 Chrome *!*/
            /*-o-transition: all .5s;	!* Opera *!*/
        }
        .show_development .Mask:hover div:nth-child(2){
            height: 0;
        }
        .show_development .Mask p{
            position: absolute;
            width: 150px;
            height: 150px;
            border-radius: 100%;
            text-align: center;
            line-height: 150px;
            background: rgba(255,255,255,0.8);
            margin: 210px 39px;
            top: 0;
            color: #a17656;
            transition: all .5s;
            -moz-transition: all .5s;	/* Firefox 4 */
            -webkit-transition: all .5s;	/* Safari 和 Chrome */
            -o-transition: all .5s;	/* Opera */
        }
        .show_development .Mask:hover p{

            background:#a17656;
            opacity: 0.6;
            color: white;
        }
        /*遮罩*/
    }
</style>
@section('template')
    @parent
    {{--{{Lang::get('lang.welcome')}}--}}
    <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
        <ol class="carousel-indicators">
            @foreach ($result['indexAd']->flash_img as $k=>$img)
                <li data-target="#carouselExampleIndicators" data-slide-to="{{$k}}" class="{{$k==0?'active':''}}"></li>
            @endforeach
        </ol>
        <div class="carousel-inner">
            @foreach ($result['indexAd']->flash_img as $k=>$img)
                <div class="carousel-item {{$k==0?'active':''}}">
                    <img class="d-block w-100" src="{{$img->ad_value}}" alt="{{$img->ad_name}}">
                </div>
            @endforeach
        </div>
        <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
        </a>
        <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
        </a>
    </div>
    @if($result['show_about_us']==1)
        <div class="about_us">
            <img class="center icon" src="./about_us.png" alt=""/>
            <figure class="figure">
                <div class="row">
                    <div class="col-2  d-none d-md-block "></div>
                    <div class="col">
                        <figcaption class="figure-caption">
                            {!! $result['indexAd']->index_about_us_content[0]->ad_value !!}
                        </figcaption>
                        <button type="button" class="btn btn-primary btn-sm btn-outline-secondary">了解更多</button>
                    </div>
                    <div class="col d-none d-md-block">
                        <img src="{{$result['indexAd']->index_about_us_img[0]->ad_value}}"
                             class="figure-img img-fluid rounded"
                             alt="A generic square placeholder image with rounded corners in a figure.">
                    </div>
                    <div class="col-2  d-none d-md-block"></div>
                </div>
            </figure>
        </div>
    @endif
    {{--是否显示关于我们--}}
    @if($result['show_news']==1)
        <div class="show_news w100">
            <img class="center icon" src="./news.png" alt=""/>
            <div class="container">
                <div class="row">
                    <div class="col-1  d-none d-md-block "></div>
                    <div class="col">
                        <ul class="nav nav-tabs  nav-pills nav-fill" id="myTab" role="tablist">
                            @foreach($result['news_list'] as $k=>$v)
                                <li class="nav-item">
                                    <a class="nav-link {{$k==0?'active':''}}" id="home-tab" data-toggle="tab"
                                       href="#page{{$k}}" role="tab" aria-controls="home"
                                       aria-selected="true">{{$v['cate_name']}}</a>
                                </li>
                            @endforeach
                        </ul>
                        <div class="tab-content" id="myTabContent">
                            @foreach($result['news_list'] as $k=>$v)
                                <div class="tab-pane fade {{$k==0?'show active':''}}" id="page{{$k}}" role="tabpanel"
                                     aria-labelledby="home-tab">
                                    @foreach($v['list'] as $key=>$value)
                                        @if($key%2==0)
                                            <div class="container {{$key>=4?'d-none d-md-block ':''}}">
                                                <div class="row">
                                                    <div class="col-md">
                                                        <div class="media">
                                                            <img class="align-self-center mr-3" src="./news_ico.png"
                                                                 alt="Generic placeholder image">
                                                            <div class="media-body">
                                                                <h6 class="mt-0">{{$value->news_title}}</h6>
                                                                <p>{{$value->news_describe}}</p>
                                                                <p class="news_time">{{$value->update_time}}</p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    @else
                                                        <div class="col-md">
                                                            <div class="media">
                                                                <img class="align-self-center mr-3" src="./news_ico.png"
                                                                     alt="Generic placeholder image">
                                                                <div class="media-body">
                                                                    <h6 class="mt-0">{{$value->news_title}}</h6>
                                                                    <p>{{$value->news_describe}}</p>
                                                                    <p class="news_time">{{$value->update_time}}</p>
                                                                </div>
                                                            </div>
                                                        </div>
                                                </div>
                                            </div>
                                        @endif
                                    @endforeach
                                    <button type="button" class="btn btn-primary btn-sm btn-outline-secondary">查看更多新闻
                                    </button>
                                </div>
                            @endforeach
                        </div>
                    </div>
                    <div class="col-1  d-none d-md-block "></div>
                </div>
            </div>
        </div>
    @endif
    {{--是否显示新闻--}}


    @if($result['show_product_development']==1)
        <div class="show_development">
            <img class="center icon" src="./development.png" alt=""/>
            <div class="container">
                <div class="row">
                    @foreach($result['indexAd']->development_pic as $k=>$v)
                        <div class="col-xl">
                            <img class="center icon development_pic" src="{{$v->ad_value}}" alt=""/>
                            <div class="Mask"><div></div><div></div><p>{{$result['indexAd']->development_text[$k]->ad_value}}</p></div>
                        </div>
                    @endforeach
                </div>
            </div>
        </div>
    @endif
    {{--是否显示产品研发--}}


    @if($result['show_product_show']==1)
        <div class="show_product">
            <img class="center icon" src="./product_show.png" alt=""/>
            <div class="container">
                <div class="row">
                    <div class="col-sm">
                        <div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
                            <div class="carousel-inner">
                                @foreach($result['show_product_list'] as $k=>$v)
                                <div class="carousel-item {{$k==0?'active':''}}">
                                    {{--轮播内容--}}
                                    <div class="media">
                                        <img class="align-self-start mr-3" src="{{$v[0]->goods_file1}}" alt="Generic placeholder image">
                                        <div class="media-body   d-none d-md-block">
                                            <h5>{{$v[0]->goods_name}}</h5>
                                            <p>{{$v[0]->goods_content}}</p>
                                        </div>
                                    </div>
                                    {{--轮播内容--}}
                                </div>
                                @endforeach
                            </div>
                            <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
                                <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                                <span class="sr-only">Previous</span>
                            </a>
                            <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
                                <span class="carousel-control-next-icon" aria-hidden="true"></span>
                                <span class="sr-only">Next</span>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    @endif
    {{--是否显示产品展示--}}


@endsection


<script>
    var app = new Vue({
        el: '#app',
        mounted: function () {

        }
    })
</script>
